package com.security.demo.service.impl;

import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.security.demo.entity.User;
import com.security.demo.mapper.UserMapper;
import com.security.demo.service.UserService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author hh
 * @since 2023-01-11
 */
@Service
public class UserServiceImpl extends ServiceImpl<UserMapper, User> implements UserService {

    @Override
    public User getUserByName(String username) {
        return this.getOne(Wrappers.lambdaQuery(User.class).eq(User::getUserName, username));
    }
}
